package com.woniuxy.location.mapper;

import com.woniuxy.commons.entity.DisabledAddress;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface AddressMapper {
    @Insert("INSERT INTO disabled_address VALUES (null,#{disabledId},#{address},#{lng},#{lat},#{name},#{telephone},#{status})")
    public boolean addAddress(DisabledAddress address);
    @Select("select id,disabled_id,address,lng,lat,name,telephone,status from disabled_address where disabled_id=#{did}")
    public List<DisabledAddress> findAddressByDisabledId(int did);

    @Delete("DELETE FROM disabled_address WHERE id = #{id}")
    public void delAddressById(int id);
    @Update("UPDATE disabled_address SET address = #{address}, lng = #{lng}, lat = #{lat}, name = #{name}, telephone = #{telephone}, status = #{status}")
    public void updateAddress(DisabledAddress address);
}
